<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

    <ui:define name="body">
    <s:div styleClass="centerer">
     <h:panelGrid columns="2" style="width:100%" columnClasses="panel30,panel60">
    <rich:panel styleClass="moviePanel">
    
    <h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.title}" styleClass="title" />
    <rich:separator height="2" lineType="solid"/>
    <h:panelGrid columns="5">
    <h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.genre}" styleClass="smallHeadLine" />
    <rich:spacer width="50px"/>
    <h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.year}" styleClass="smallHeadLine" />
    <rich:spacer width="50px"/>
    <h:graphicImage value="/img/heart.png" title="Kedvenc"  rendered="#{MoviePageBean.liked}" />
    </h:panelGrid>
    <rich:spacer height="50px"/>
    <h:graphicImage value="#{MoviePageBean.selectedMovieStateHolder.selected.posterUrl}"/>
    <br/>
    <rich:spacer height="25px"/>
    <br/>
    <h:form>
    <h:commandButton action="movieEditPage" title="Szerkeszt" value="Szerkeszt" image="/img/edit.png" styleClass="myButton"/>
    <rich:spacer width="5px"/>
    <h:commandButton action="#{MoviePageBean.like()}" title="Kedvenc" value="Kedvenc" image="/img/heart.png" styleClass="myButton"  rendered="#{not MoviePageBean.liked}"/>
    <h:commandButton action="#{MoviePageBean.like()}" title="Kedvenc torlese" value="Kedvenc torol" image="/img/black_heart.png" styleClass="myButton"  rendered="#{MoviePageBean.liked}"/>
    </h:form>
    </rich:panel>
    
    <h:panelGrid columns="1" style="width:100%">
    <rich:simpleTogglePanel switchType="client" label="Reszletek" style="width:100%">
    <h:panelGrid columns="2"  columnClasses="panel20,panel80" style="width:100%">
    <h:outputText value="#{messages['hu.bme.tesslo.hmdb.runtime']}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.runtime)}"/>
    <h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.runtime}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.runtime)}"/>
    
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.runtime)}"/>
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.runtime)}"/>
    
    <h:outputText value="#{messages['hu.bme.tesslo.hmdb.director']}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.director)}"/>
    <h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.director}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.director)}"/>
    
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.director)}"/>
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.director)}"/>
    
    <h:outputText value="#{messages['hu.bme.tesslo.hmdb.writer']}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.writer)}" />
    <h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.writer}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.writer)}"/>
    
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.writer)}"/>
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.writer)}"/>
    
    <h:outputText value="#{messages['hu.bme.tesslo.hmdb.actors']}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.actors)}" />
    <h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.actors}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.actors)}"/>
    
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.actors)}"/>
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.actors)}"/>
    
    <h:outputText value="#{messages['hu.bme.tesslo.hmdb.plot']}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.plot)}"/>
    <h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.plot}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.plot)}" />
    
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.plot)}"/>
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.plot)}"/>
    
    <h:outputText value="#{messages['hu.bme.tesslo.hmdb.imdbRating']}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.imdbRating)}"/>
    <h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.imdbRating}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.imdbRating)}"/> 
    
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.imdbRating)}"/>
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.imdbRating)}"/>
    
    <h:outputText value="#{messages['hu.bme.tesslo.hmdb.imdbid']}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.imdbID)}"/>
    <s:div styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.imdbID)}">
    <a href="http://www.imdb.com/title/#{MoviePageBean.selectedMovieStateHolder.selected.imdbID}" target="blank"><h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.imdbID}"/> </a>
    </s:div>
    
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.imdbID)}"/>
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.imdbID)}"/>
    
    <h:outputText value="#{messages['hu.bme.tesslo.hmdb.localURL']}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.localUrl)}" />
    <h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.localUrl}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.localUrl)}" />
    
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.localUrl)}"/>
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.localUrl)}"/>
    
    <h:outputText value="#{messages['hu.bme.tesslo.hmdb.language']}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.language)}"/>
    <h:outputText value="#{MoviePageBean.selectedMovieStateHolder.selected.language}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.language)}" />
    
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.language)}"/>
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.language)}"/>
    
    <h:outputText value="#{messages['hu.bme.tesslo.hmdb.subtitle']}" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.subtitle)}"/>  
    <h:selectBooleanCheckbox  value="#{MoviePageBean.selectedMovieStateHolder.selected.subtitle}" readonly="true" disabled="true" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.subtitle)}"/>
    
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.subtitle)}"/>
    <rich:separator height="1" lineType="solid" styleClass="smallHeadLine"  rendered="#{not (null == MoviePageBean.selectedMovieStateHolder.selected.subtitle)}"/>
    
    </h:panelGrid>
    </rich:simpleTogglePanel>
    
    <rich:simpleTogglePanel switchType="client" label="#{messages['hu.bme.tesslo.hmdb.rating']}" opened="false">
    	<ui:include src="/layout/ratings.xhtml"/>
	</rich:simpleTogglePanel>
    
    
    </h:panelGrid> 
    
    </h:panelGrid>
    </s:div>
    </ui:define>
    
</ui:composition>